<?php
namespace Home\Controller;
use Think\Controller;
header('content-type:text/html;charset="UTF-8"');
class AddressController extends Controller {
    public function index(){
        $dc=M('shopcart');//统计购物车的数量
        $uid=$_SESSION['uid'];
        if (!empty($uid)) {
            $dataCount=$dc->where("uid={$uid}")->select();
            $count=count($dataCount);
            $this->assign('count',$count);  
        }   
        $this->display();
    }
  
}